package com.elgenring.basic.mapper;

import com.elgenring.basic.query.BaseQuery;
import com.elgenring.system.domain.Systemdictionarytype;
import com.elgenring.system.query.SystemdictionarytypeQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface BaseMapper<T> {

    /**
     * @Title: loadAll
     * @Description: 查询所有
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     * @Return
     */
    List<T> loadAll ();

    /**
     * @Title: loadById
     * @Description: 查询单个
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     * @Return
     */
    T loadById (Long id);

    /**
     * @Title: save
     * @Description: 添加
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     * @Return
     */
    void save (T t);

    /**
     * @Title: remove
     * @Description: 删除
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     * @Return
     */
    void remove (Long id);

    /**
     * @Title: update
     * @Description: 修改
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     * @Return
     */
    void update (T t);

    /**
     * @Title: queryCount
     * @Description: 查询数量
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     * @Return
     */
    Integer queryCount (BaseQuery baseQuery);

    /**
     * @Title: queryData
     * @Description: 封装内容数量与数据
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/21 20:51  
     * @Parameters:
     *  com.elgenring.basic.mapper.BaseMapper.queryData
     * @Return com.elgenring.basic.mapper.BaseMapper#queryData(com.elgenring.basic.query.BaseQuery)
     */
    List<T> queryData (BaseQuery baseQuery);

    /**
     * @Title: batRemove
     * @Description: 批量删除
     * @Author: Atlas
     * @Version: 1.0
     * @Date:  2022/6/25 19:47
     * @Parameters: 前端批量删除传过来的参数
     * @Return
     */
    void batRemove(Long[] ids);
}
